<?php
	include '../common/connect.php';
	$result = mysql_query("SELECT * FROM user");
	$i = 0;
	while($row = mysql_fetch_array($result)){
		$resultArray[$i] = array(
			'id' => $row['id'],
			'username' => $row['username'],
			'password' => $row['password'],
			'type' => $row['type']
		);
		$i++;
	}
	mysql_close($con);
	echo json_encode($resultArray);
?>